Interface: BuildNotificationOptions
Auto.js Pro 9 Docs / notification / BuildNotificationOptions
Interface: BuildNotificationOptions
notification.BuildNotificationOptions
创建通知的选项,包括通知标题、通知内容、通知图标、通知点击后的行为、按钮等。
Create notification options, including notification title, content, icon, action, button, etc.
See
buildNotification
Table of contents
Properties
Properties
actions
• Optional actions: NotificationAction[]
通知的动作列表,用于配置通知的额外按钮。
autoCancel
• Optional autoCancel: boolean
当autoCancel为true时,用户单击通知栏会自动取消,默认为false。
contentText
• Optional contentText: string
通知的内容文本。
contentTitle
• Optional contentTitle: string
通知的内容标题。
onContentClick
• Optional onContentClick: VoidFunction
点击通知内容时的回调函数,当用户点击通知内容时此函数会被执行。
onDelete
• Optional onDelete: VoidFunction
通知被删除时的回调函数,当用户删除通知时此函数会被执行。
ongoing
• Optional ongoing: boolean
ongoing设置一个正在进行的通知。通常用来表示一个后台任务,比如正在后台播放音乐或者下载文件等。
silent
• Optional silent: boolean
silent设置状态栏消息是否静默通知,默认为false。
ticker
• Optional ticker: string
通知显示时状态栏显示的通知内容。
